<?php

namespace common\model;

use think\model\RelationModel;

class OriginalPlanNodeModel extends RelationModel
{
    //1=标准排期 2=组内排期 3=标准需求 4=非标需求 5=延期 6=工单 7=提前
    const TYPE_STANDARD_PLAN = 1;
    const TYPE_INNER_PLAN = 2;
    const TYPE_STANDARD_NOTE = 3;
    const TYPE_NOTE = 4;
    const TYPE_DELAY_ORDER = 5;
    const TYPE_WORK_ORDER = 6;
    const TYPE_DELAY_EARLY = 7;

    // 未执行
    const STATUS_UN_EXEC = 1;
    // 已执行
    const STATUS_EXEC = 2;

    //是否同步详细表
    const IS_SYNC_DETAIL_NO = 0;
    const IS_SYNC_DETAIL_YES = 1;


    //节点类型（1=交付节点、2=完成节点）
    const NODE_TYPE_DELIVERY = 1;
    const NODE_TYPE_FINISH = 2;

    //所处阶段 1=T1, 2=T2
    const STAGE_DEFAULT = 0;
    const STAGE_T1 = 1;

    // 自动完成
    protected $_auto = [
        ['created_by', 'fill_created_by', self::MODEL_INSERT, 'function'],
        ['created', 'time', self::MODEL_INSERT, 'function'],
    ];
}
